package org.devocean.groupbuying.service.impl;

import java.util.List;

import org.devocean.groupbuying.dao.TagsDAO;
import org.devocean.groupbuying.domain.Tags;
import org.devocean.groupbuying.service.TagsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TagsServiceImpl implements TagsService {

	@Autowired
	private TagsDAO tagsDAO;
	
	@Transactional
	public List<Tags> getAllTags() {
		
		return tagsDAO.findAllTags();
	}

	@Transactional
	public List<Tags> getTagsByCriteria(String criteria,Integer start,Integer limit) {
		
		return tagsDAO.findTagsByCriteria(criteria,start,limit);
	}

	public long countTagsByCriteria(String criteria) {
		
		return tagsDAO.countTagsByCriteria(criteria);
	}

}
